<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
  <!-- Bootstrap -->
  <link href="{{ url_for('static', filename='bootstrap/css/bootstrap.min.css') }}" rel="stylesheet">
  <!-- Custom styles for this template -->
  <link type="text/css" href="{{ url_for('static', filename='css/swamp.css') }}" rel="stylesheet">

  <!--{% assets "main_css" %}-->
  <!--<link rel="stylesheet" type="text/css" href="{{ ASSET_URL }}">-->
  <!--{% endassets %}-->

  {% block extracss %}
  <!-- 扩展css -->
  {% endblock %}

  {% block title %}
  <title>SWAMP</title>
  {% endblock %}

  <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
  <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
  <!--[if lt IE 9]>
  <!--<script src="https://cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script>-->
  <!--<script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>-->
  <![endif]-->
</head>
<body>

<!-- Fixed navbar -->
<nav class="navbar navbar-default navbar-fixed-top">
  <div class="container">
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a class="navbar-brand" href="#">WINDPLAY 运维脚本平台</a>
    </div>
    <div id="navbar" class="navbar-collapse collapse">
      <ul class="nav navbar-nav">
        <li><a href="{{ url_for('index') }}">首页</a></li>
        <li><a href="{{ url_for('manage_scritps') }}">脚本管理</a></li>
        <li><a href="#contact">Contact</a></li>
        <li class="dropdown">
          <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Dropdown <span class="caret"></span></a>
          <ul class="dropdown-menu">
            <li><a href="#">Action</a></li>
            <li><a href="#">Another action</a></li>
            <li><a href="#">Something else here</a></li>
            <li role="separator" class="divider"></li>
            <li class="dropdown-header">Nav header</li>
            <li><a href="#">Separated link</a></li>
            <li><a href="#">One more separated link</a></li>
          </ul>
        </li>
      </ul>
      <ul class="nav navbar-nav navbar-right">
        <li><a href="#">
          {% if current_user.is_authenticated %}
          Hi {{ current_user.username }}!
          {% else %}
          Hi Please sign in!
          {% endif %}
        </a></li>
        <li><a href="{{ url_for('regist') }}">注册新帐号</a></li>
        <li><a href="{{ url_for('logout') }}">退出</a></li>
        <!--<li class="active"><a href="#">Fixed top <span class="sr-only">(current)</span></a></li>-->
      </ul>
    </div><!--/.nav-collapse -->
  </div>
</nav>


<div class="container">
  <div>
    <!-- flash消息 -->
    {% for message in get_flashed_messages() %}
    <div class="alert alert-warning">
      <button type="button" class="close" data-dismiss="alert">&times;</button>
      {{ message }}
    </div>
    {% endfor %}
    <!-- //flash消息 -->
    {% block content %}
    <!-- 内容区域 -->
    {% endblock  %}
  </div>
</div>

<footer class="footer">
  <div class="container">
    <p class="text-muted">Copyright © 2017-2018 WINDPLAY OPERATION CENTER</p>
  </div>
</footer>

<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<!-- <script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script> -->
<!--<script src="{{ url_for('static', filename='js/jquery.min.js') }}"></script>-->
<!-- Include all compiled plugins (below), or include individual files as needed -->
<!--<script src="{{ url_for('static', filename='bootstrap/js/bootstrap.min.js') }}"></script>-->

{% assets "main_js" %}
<script src="{{ ASSET_URL }}"></script>
{% endassets %}

{% block extrajs %}
<!-- 其它脚本 -->
{% endblock %}

</body>
</html>